Skip to content

Update Testing README to add best practice for caching ReferenceAssemblies#1160

Closed
MattKotsenas wants to merge 1 commit intodotnet:mainfrom
MattKotsenas:feature/testing-docs
Closed

Update Testing README to add best practice for caching ReferenceAssemblies#1160
MattKotsenas wants to merge 1 commit intodotnet:mainfrom
MattKotsenas:feature/testing-docs

Conversation

@MattKotsenas
Copy link
Copy Markdown
Member

@MattKotsenas MattKotsenas commented Jun 7, 2024

Add a "best practice" and example of caching ReferenceAssemblies between tests. New users of the testing infrastructure often set the reference assemblies in a constructor, but don't use static or another method to share the instance between tests resulting in a lot of re-resolution and slow tests. As best I can tell this guidance isn't documented anywhere, but all the tests seem to do it.

@MattKotsenas
Copy link
Copy Markdown
Member Author

MattKotsenas commented Jun 14, 2024

@sharwell, this PR has some documentation changes that are also related to #1162.

Feel free to either take this PR as-is, or if you want the test framework stuff as part of your change I can rebase away that part and make this reference assembly specific.

Edit: I rebased away the XUnit stuff since that's already merged.

@MattKotsenas MattKotsenas force-pushed the feature/testing-docs branch from 9a356ac to a5d64da Compare June 19, 2024 16:52
@MattKotsenas MattKotsenas changed the title Update Testing README to remove xUnit references and add best practice for caching ReferenceAssemblies Update Testing README to add best practice for caching ReferenceAssemblies Jun 19, 2024
@sharwell
Copy link
Copy Markdown
Contributor

Hi @MattKotsenas,

Can you review #1176 to see if it meets your needs in a (hopefully) simpler fashion?

Thanks!

@sharwell
Copy link
Copy Markdown
Contributor

@MattKotsenas I believe this should no longer be necessary (per the previous comment). Please feel free to reopen if you find otherwise.

@sharwell sharwell closed this Aug 26, 2024
@MattKotsenas
Copy link
Copy Markdown
Member Author

Sorry, this fell down my TODO list. This works for me! Thanks!

@MattKotsenas MattKotsenas deleted the feature/testing-docs branch August 26, 2024 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants